package cn.iocoder.yudao.module.erp.controller.app.purchaseplan;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.erp.controller.admin.purchaseplan.vo.PurchasePlanRespVO;
import cn.iocoder.yudao.module.erp.service.purchaseplan.PurchasePlanService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

@Tag(name = "APP - 采购计划")
@RestController
@RequestMapping("/erp/app-purchase-plan")
@Validated
public class AppPurchasePlanController {

    @Resource
    private PurchasePlanService purchasePlanService;


    @GetMapping("/get")
    @Operation(summary = "获取详情接口")
    @Parameter(name = "id", description = "编号", required = true, example = "1024")
    public CommonResult<PurchasePlanRespVO> getPurchasePlan(@RequestParam("id") Long id) {
        return success(purchasePlanService.getPurchasePlan(id));
    }


}
